//
//  ZXY_DownLoadUtility.h
//  DownLoadTest
//
//  Created by 宇周 on 15/8/25.
//  Copyright (c) 2015年 宇周. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ZXY_DownloadActionItem.h"
#import "ZXY_DownItem.h"
#import "ZXYFileOperateHelper.h"
@interface ZXY_DownLoadUtility : NSObject
//将下载item写入文件
+ (void)writeActionItemToFile:(ZXY_DownItem *)itemToWrite;

//退出item
+ (void)removeActionItemFromFile:(ZXY_DownItem *)itemToRemove;

+ (void)removeActionItemFromFileWithKey:(NSString *)itemKey;

//根据key获取下载的item
+ (ZXY_DownItem   *) itemFromFileWithKey:(NSString *)key;

//获取全部的下载item (ZXY_DownItem)
+ (NSMutableArray *) itemArrFromFile;

//将dic转换为下载的item
+ (ZXY_DownItem *)dicToItem:(NSDictionary *)dic;

//将下载的item转换为dic
+ (NSDictionary *)itemToDic:(ZXY_DownItem *)item;

+ (void)setResumeDataForKey:(NSString *)key andData:(NSData *)resumeData;

+ (void)setStatusForKey:(NSString *)key andStatus:(NSString *)status;
@end
